﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace SmartConference.Infrastructure.Migrations
{
    public partial class 用户表 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "UserInfo",
                columns: table => new
                {
                    IDNumber = table.Column<long>(type: "bigint", nullable: false),
                    UserNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    PhoneNumber = table.Column<string>(type: "nvarchar(11)", maxLength: 11, nullable: false),
                    UserPassword = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    MemberLevel = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    Sex = table.Column<int>(type: "int", nullable: false),
                    Birthday = table.Column<DateTime>(type: "datetime2", nullable: false),
                    LiveCity = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    Occupation = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    PersonalizedDesc = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    UserStatus = table.Column<int>(type: "int", nullable: false),
                    OrderList = table.Column<int>(type: "int", nullable: false),
                    ConsumptionSum = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    AvailableIntegral = table.Column<int>(type: "int", nullable: false),
                    CreateId = table.Column<int>(type: "int", nullable: false),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    UpdateId = table.Column<int>(type: "int", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteId = table.Column<int>(type: "int", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_UserInfo", x => x.IDNumber);
                });

            migrationBuilder.InsertData(
                table: "UserInfo",
                columns: new[] { "IDNumber", "AvailableIntegral", "Birthday", "ConsumptionSum", "CreateId", "CreateName", "DeleteId", "DeleteName", "IsDelete", "LiveCity", "MemberLevel", "Occupation", "OrderList", "PersonalizedDesc", "PhoneNumber", "Sex", "UpdateId", "UpdateName", "UserNumber", "UserPassword", "UserStatus" },
                values: new object[] { 1L, 100, new DateTime(2025, 5, 24, 8, 44, 17, 978, DateTimeKind.Local).AddTicks(379), 100m, 1, "admin", null, null, false, "上海", "管理员", "程序员", 1, "程序员", "12345678901", 1, null, null, "admin", "123456", 1 });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "UserInfo");
        }
    }
}
